9876fe56544e0461b7283255cc62bdb928f71e71,src/test/java/org/apache/commons/validator/routines/DomainValidatorTest.java,DomainValidatorTest,main,#String#,160

Before Change


        Set ianaTlds = new HashSet(); // keep for comparison with array contents
        DomainValidator dv = DomainValidator.getInstance();;
        File f = new File("target/tlds-alpha-by-domain.txt");
        if (!f.canRead()) {
            String tldurl="http://data.iana.org/TLD/tlds-alpha-by-domain.txt";
            System.out.println("Downloading " + tldurl);
            byte buff[] = new byte[1024];

After Change


        File f = new File("target/tlds-alpha-by-domain.txt");
        String tldurl="http://data.iana.org/TLD/tlds-alpha-by-domain.txt";
        HttpURLConnection hc = (HttpURLConnection) new URL(tldurl).openConnection();
        if (f.canRead()) {
            SimpleDateFormat sdf = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss z");//Sun, 06 Nov 1994 08:49:37 GMT
            long modTime = f.lastModified();
            String since = sdf.format(new Date(modTime));